//============================================================================
// Name        : main.cpp
// Author      : Steve Hodkin
// Version     : 1.0
// Copyright   : Your copyright notice
// Description : opencv example in C++, Ansi-style
//============================================================================
#include <stdio.h>
#include "cv.h"
#include "highgui.h"
using namespace std;
int main(int argc, char* argv[])
{
    //create and setup a window called "Demo"
    cvNamedWindow("Zuidplein Prototype v0.1", CV_WINDOW_AUTOSIZE);
    //setup camera capture process
    CvCapture* capture=cvCaptureFromCAM(0);
    //loop and keep displaying web cam image
    while( 1 ) 
    {
        //exit when esc key pressed
        if (cvWaitKey(100)== 27) break;
        //get's image
        IplImage* frame = cvQueryFrame(capture);
        //display's image in the window
        
        cvShowImage("Zuidplein Prototype v0.1", frame);
    }
    
    //clean up and destroy Demo window
    cvDestroyWindow("Zuidplein Prototype v0.1");
    return 0;
}